﻿using System;

namespace Creventive.Wpf.ShellFactory.Workspace
{
    /// <summary>
    /// The event arguments for the ModelCommandExecuteQueried event
    /// </summary>
    public class ModelCommandExecuteQueriedEventArgs : EventArgs
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ModelCommandExecuteQueriedEventArgs"/> class.
        /// </summary>
        /// <param name="parameter">The parameter.</param>
        public ModelCommandExecuteQueriedEventArgs(object parameter)
        {
            this.Parameter = parameter;
        }

        /// <summary>
        /// Gets or sets a value indicating whether this event should be cancelled.
        /// </summary>
        /// <value><c>true</c> if the event should be cancelled; otherwise, <c>false</c>.</value>
        public bool Cancel { get; set; }

        /// <summary>
        /// Gets the command parameter.
        /// </summary>
        /// <value>The parameter.</value>
        public object Parameter { get; private set; }
    }

    /// <summary>
    /// The event arguments for the ModelCommandExecuteQueried event
    /// </summary>
    /// <typeparam name="Targ">The type of the arg.</typeparam>
    public class ModelCommandExecuteQueriedEventArgs<Targ> : EventArgs
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ModelCommandExecuteQueriedEventArgs&lt;Targ&gt;"/> class.
        /// </summary>
        /// <param name="parameter">The parameter.</param>
        public ModelCommandExecuteQueriedEventArgs(Targ parameter)
        {
            this.Parameter = parameter;
        }

        /// <summary>
        /// Gets or sets a value indicating whether this event should be cancelled.
        /// </summary>
        /// <value><c>true</c> if the event should be cancelled; otherwise, <c>false</c>.</value>
        public bool Cancel { get; set; }

        /// <summary>
        /// Gets the command parameter.
        /// </summary>
        /// <value>The parameter.</value>
        public Targ Parameter { get; private set; }
    }
}